<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>详情</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="./css/mui.min.css" rel="stylesheet" />
		<style type="text/css">
			.mui-content>h1 {
				font-size: 16px;
				text-align: center;
				margin-top: 13px;
			}
			
			.pa15 {
				padding: 10px;
			}
			
			.bar {
				font-size: 14px;
				display: flex;
				justify-content: space-between;
				margin-top: 20px;
				color: #666;
				padding: 0 6px 5px;
				border-bottom: 1px solid #D8D8D8;
			}
			
			.zhengwen {
				padding: 10px;
			}
			
			.zhengwen p {
				text-indent: 2em;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">动态详情</h1>
		</header>
		<div class="mui-content pa15" id="app">
			<h1>{{title}}</h1>
			<div class="bar">
				<span>作者：{{fborg}}</span>
				<span>{{fbdate}}</span>
			</div>
			<div class="zhengwen" v-html="content">

			</div>
		</div>
		<script src="js/mui.min.js"></script>
		<script src="js/vue.js"></script>
		<script type="text/javascript">
			mui.init();
			var id = localStorage.getItem('ID');
			var app = new Vue({
				el: '#app',
				data: {
					content: '',
					fbdate: '',
					fborg: '',
					title: ''
				}
			})
			console.log(id);
			mui.ajax(URL + 'meCompanyUser!findOpeateNews', {
				data: {
					id: id
				},
				dataType: 'json', //服务器返回json格式数据
				type: 'post', //HTTP请求类型
				timeout: 10000, //超时时间设置为10秒；
				success: function(data) {
					if(data.data) {
						app.content = data.data[0].newsContent;
						app.fbdate = data.data[0].isCtdate;
						app.fborg = data.data[0].newsAuthor;
						app.title = data.data[0].newsTitle;
					}
					console.log(JSON.stringify(data))
				},
				error: function(xhr, type, errorThrown) {
					console.log(xhr)

				}
			});
		</script>
	</body>

</html>